﻿@model handvn.Models.DetailCategories
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
@if (Request.IsAuthenticated && @Session["LoaiTaiKhoan"]!=null)
{
    if (@Session["LoaiTaiKhoan"].ToString() == "admin")
    {
    <h1>
        Quản lý chi tiết danh mục</h1>
    <h2>
        Create</h2>

    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

        using (Html.BeginForm())
        {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>DetailCategories</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.CategoriesID, "Categories")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoriesID", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoriesID)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TenChiTietDanhMuc)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TenChiTietDanhMuc)
            @Html.ValidationMessageFor(model => model.TenChiTietDanhMuc)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TinhTrang)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TinhTrang)
            @Html.ValidationMessageFor(model => model.TinhTrang)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
        }

    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
    }
}
else
{
    <p>
        Xin vui lòng đăng nhập</p>
    <script type="text/javascript">
        window.location.href = "http://handvn.com/Account/Admin"
    </script>
}